package dilmaj.client;

import javax.jdo.annotations.*;

import dilmaj.shared.AreaVO;

@PersistenceCapable
public class AreaJDO {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;
    
    @Persistent
	private String caption;
    
    public AreaJDO() {
    
    }
    
    public AreaJDO(AreaVO areaVO) {
    	id=areaVO.getId();
    	
    	if (areaVO.getCaption()==null)
    		caption="";
    	else
    		caption=areaVO.getCaption();
    }
    
    public AreaJDO(String caption) {
    	this.caption=caption;
    }
	
	public void setCaption(String newCaption) {
		caption=newCaption;
	}
	
	public Long getId() {
		return id;
	}
	
	public String getCaption() {
		return caption;
	}
}
